home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / 3d_hyper / 3d_hyper.dcr / Scripts_11_Car Spin.ls < prev    next >
Encoding:
Text File  |  2011-06-09  |  590 b   |  22 lines

  1. property pTheModel, pLastTime
  2.  
  3. on beginSprite me
  4.   sprite(me.spriteNum).cursor = 0
  5.   myMem = sprite(me.spriteNum).member
  6.   pTheModel = myMem.model[1]
  7.   repeat with i = 1 to pTheModel.shaderList.count
  8.     pTheModel.shaderList[i].transparent = 0
  9.   end repeat
  10.   if (the environment).productVersion = "8.5.1" then
  11.     sprite(me.spriteNum).antiAliasingEnabled = 1
  12.   end if
  13.   pLastTime = the milliSeconds
  14. end
  15.  
  16. on exitFrame me
  17.   timeElapsed = the milliSeconds - pLastTime
  18.   thePercent = timeElapsed / 33.0
  19.   pTheModel.rotate(vector(0, 3 * thePercent, 0), #self)
  20.   pLastTime = the milliSeconds
  21. end
  22.